package com.sneakxy.cloudbase.platform.bean;

import org.springframework.data.annotation.Id;
import org.springframework.data.annotation.Transient;

import com.sneakxy.cloudbase.platform.shiro.ShiroAccount;
import com.sneakxy.mybatis.commons.annotations.Column;
import com.sneakxy.mybatis.commons.annotations.Table;
import com.sneakxy.mybatis.commons.orm.generation.GeneratedValue;
import com.sneakxy.mybatis.commons.orm.generation.GenerationType;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 账号信息
 * @author 潜行的虚影
 * @see
 */
@Data
@Table("t_mb4j_account")
@EqualsAndHashCode(callSuper = false)
public class Account extends BaseEntity<String> implements TimeEntity, ShiroAccount {

	/**
	 * 
	 */
	private static final long serialVersionUID = -6969225057117229884L;

	/**
	 * 账号ID
	 */
	@Id
	@Column("id")
	@GeneratedValue(strategy = GenerationType.MANUAL)
	private String id;

	/**
	 * 账号
	 */
	@Column("account")
	private String account;

	/**
	 * 作用域
	 */
	@Column("host")
	private String host;

	/**
	 * 显示名，用于页面显示使用
	 */
	@Column("display_name")
	private String displayName;

	/**
	 * 密码
	 */
	@Column("password")
	private String password;

	/**
	 * 状态
	 */
	@Column("status")
	private int status;

	/**
	 * 备注
	 */
	@Column("memo")
	private String memo;

	/**
	 * 
	 */
	@Column("createtime")
	private String createtime;

	/**
	 * 
	 */
	@Column("updatetime")
	private String updatetime;

	@Transient
	private boolean isNew;
	
	@Override
	public boolean isNew() {
		return isNew;
	}

	@Override
	public void setNew(boolean isNew) {
		this.isNew = isNew;
	}

}
